using Admin.NET.Core;
using SqlSugar;

namespace Admin.NET.Application.Entity.Business;

[SugarTable("PowerConsumptionRecord", "用电量记录表/结算表")]
[Tenant("questdb")]
public class PowerConsumptionRecord : EntityTenant
{
	/// <summary>
	/// 表号/imei/序列号
	/// </summary>
	public string Sn { get; set; }

	/// <summary>
	/// 表唯一编号
	/// </summary>
	public long MeterId { get; set; }

	/// <summary>
	/// 名称
	/// </summary>
	public string Name { get; set; }

	/// <summary>
	/// 协议类型：0：4G-modbus，1：4G-dlt645，2：采集器-modbus，3：采集器-dlt645
	/// </summary>
	public int ProtocolType { get; set; }

	/// <summary>
	/// 表地址或站号
	/// </summary>
	public string Addr { get; set; }

	/// <summary>
	/// 倍率，pt*ct，默认1
	/// </summary>
	public double Multiplier { get; set; }

	/// <summary>
	/// 组合有功总电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveTotalElectricEnergy { get; set; }

	/// <summary>
	/// 组合有功尖电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveSharpElectricEnergy { get; set; }

	/// <summary>
	/// 组合有功峰电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActivePeakElectricEnergy { get; set; }

	/// <summary>
	/// 组合有功平电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveFlatElectricEnergy { get; set; }

	/// <summary>
	/// 组合有功谷电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveValleyElectricEnergy { get; set; }

	/// <summary>
	/// 组合有功谷电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? CombinedActiveDeepValleyElectricEnergy { get; set; }

	/// <summary>
	/// 差值组合有功总电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveTotalElectricEnergyDifference { get; set; }

	/// <summary>
	/// 差值组合有功尖电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveSharpElectricEnergyDifference { get; set; }

	/// <summary>
	/// 差值组合有功峰电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActivePeakElectricEnergyDifference { get; set; }

	/// <summary>
	/// 差值组合有功平电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveFlatElectricEnergyDifference { get; set; }

	/// <summary>
	/// 差值组合有功谷电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CombinedActiveValleyElectricEnergyDifference { get; set; }

	/// <summary>
	/// 差值组合有功谷电能（表显）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? CombinedActiveDeepValleyElectricEnergyDifference { get; set; }

	/// <summary>
	/// 结算费用（元）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? Amount { get; set; }

	/// <summary>
	/// 电价方案
	/// </summary>
	public long? PriceRuleId { get; set; }

	/// <summary>
	/// 0单费率，1复费率
	/// </summary>
	public int Type { get; set; }

	/// <summary>
	/// 单费率单价 元/度
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? Price { get; set; }

	/// <summary>
	/// 尖 单价 元/度
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? SharpPrice { get; set; }

	/// <summary>
	/// 峰 单价 元/度
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? PeakPrice { get; set; }

	/// <summary>
	/// 平 单价 元/度
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? FlatPrice { get; set; }

	/// <summary>
	/// 谷 单价 元/度
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? ValleyPrice { get; set; }

	/// <summary>
	/// 谷 单价 元/度
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? DeepValleyPrice { get; set; }

	/// <summary>
	/// 区域id
	/// </summary>
	public long? BuildingId { get; set; }

	/// <summary>
	/// 房间id
	/// </summary>
	public long? RoomId { get; set; }

	/// <summary>
	/// 采集器id
	/// </summary>
	public long? CollectorId { get; set; }

	/// <summary>
	/// A电压
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal VoltageA { get; set; }

	/// <summary>
	/// B电压
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal VoltageB { get; set; }

	/// <summary>
	/// c电压
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal VoltageC { get; set; }

	/// <summary>
	/// A电流
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CurrentA { get; set; }

	/// <summary>
	/// B电流
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CurrentB { get; set; }

	/// <summary>
	/// C电流
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal CurrentC { get; set; }

	/// <summary>
	/// 总有功功率
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal ActivePowerAll { get; set; }

	/// <summary>
	/// A像功率
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal ActivePowerA { get; set; }

	/// <summary>
	/// b功率
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal ActivePowerB { get; set; }

	/// <summary>
	/// c功率
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal ActivePowerC { get; set; }

	/// <summary>
	/// 补贴费用
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal SubsidyFee { get; set; }

	/// <summary>
	/// 当月补贴的费用
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal NowSubsidyFee { get; set; }

	/// <summary>
	/// 是否手动抄表，默认false：主动上报，true，手动抄表，无电压等
	/// </summary>
	public bool IsHands { get; set; }

	/// <summary>
	/// 电损结算费用（元）
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? LossAmount { get; set; }

	/// <summary>
	/// 电损百分比，用电量的百分比*电价==结算金额
	/// </summary>
	public double? ElectricityLossPercentage { get; set; }
}
